Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up and refactor IngameWindow button handling #1608

Conversation

falbrechtskirchinger
Copy link
Contributor

@falbrechtskirchinger falbrechtskirchinger commented Jul 18, 2023

I'll rebase #1606 and implement discussed changes before this is ready for consideration.

Copy link
Member

@Flamefire Flamefire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, only change is basically to use an enum class throughout.

I added pointers how to make best use of that, if anything is unclear, feel free to ask.

libs/s25main/ingameWindows/IngameWindow.h Outdated Show resolved Hide resolved
libs/s25main/ingameWindows/IngameWindow.h Outdated Show resolved Hide resolved
libs/s25main/ingameWindows/IngameWindow.h Outdated Show resolved Hide resolved
libs/s25main/ingameWindows/IngameWindow.cpp Outdated Show resolved Hide resolved
libs/s25main/ingameWindows/IngameWindow.cpp Outdated Show resolved Hide resolved
@falbrechtskirchinger falbrechtskirchinger force-pushed the refactor-ingamewindow branch 2 times, most recently from 3df993a to 9358be6 Compare July 18, 2023 11:18
@falbrechtskirchinger
Copy link
Contributor Author

Had to move the enum out of the class, as maxEnumValue(ButtonId) isn't usable in an incomplete class context.

Copy link
Member

@Flamefire Flamefire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to move the enum out of the class, as maxEnumValue(ButtonId) isn't usable in an incomplete class context.

Shame but unfortunately true :(

Last bit of polishing is mostly getting rid of the remnants of the button ID: Rename the enum and all variables of that type (from ìdto e.g.buttonorbt`)

libs/s25main/ingameWindows/IngameWindow.h Outdated Show resolved Hide resolved
libs/s25main/ingameWindows/IngameWindow.h Outdated Show resolved Hide resolved
libs/s25main/ingameWindows/IngameWindow.cpp Outdated Show resolved Hide resolved
libs/s25main/ingameWindows/IngameWindow.cpp Outdated Show resolved Hide resolved
Flamefire
Flamefire previously approved these changes Jul 19, 2023
Copy link
Member

@Flamefire Flamefire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Flamefire Flamefire enabled auto-merge (rebase) July 19, 2023 11:14
@Flamefire Flamefire merged commit df3aa8c into Return-To-The-Roots:master Jul 20, 2023
@falbrechtskirchinger falbrechtskirchinger deleted the refactor-ingamewindow branch July 20, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants